﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrayCheckControl
{
    public class IpEndPointSet : System.ComponentModel.INotifyPropertyChanged
    {
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string propertyName)
        {
            if (null != this.PropertyChanged)
            {
                this.PropertyChanged(this,
                    new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }

        private string ip = "127.0.0.1";
        private int port = 10000;
        public string Ip
        {
            get => this.ip;
            set
            {
                this.ip = value;
                this.OnPropertyChanged("Ip");
            }
        }
        public int Port
        {
            get => this.port;
            set
            {
                this.port = value;
                this.OnPropertyChanged("Port");
            }
        }
        public void Copy(IpEndPointSet epSet)
        {
            this.Ip = epSet.ip;
            this.Port = epSet.port;
        }
    }
}
